//This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .CS}

//-------------MAIN---------------
thread 'EXW'


0AC6: 0@ = label @get_1 offset
0AC6: 4@ = label @get_2 offset
0AF1: write_int 0 to_ini_file "CLEO\POZIT.INI" section "end_WARS" key "KEY" 
0AF1: write_int 0 to_ini_file "CLEO\POZIT.INI" section "SET_WARS" key "KEY"

//0A92: create_custom_thread "SET\CARS.CS" //sk3adniki 
33@ = 0 // licznik
var
16@:int
30@:int
end
:hecking
wait 0
while true
    repeat
    wait 0 
    until if Player.Defined(0)
    Actor.StorePos($PLAYER_ACTOR, 27@, 28@, 29@)
    if and
        not actor.Driving($PLAYER_ACTOR)
        0AE1: 17@ = random_actor_near_point 27@ 28@ 29@ in_radius 800.0 find_next 1 pass_deads 0 //IF and SET 
    then
        089F: get_actor 17@ pedtype_to 10@ 
        if 
            10@ == 7
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then
                21@ = 102 
                20@ = 103 
                19@ = 104 
                18@ = -16711681
                jump @continue1
            end
        end
        if 
            10@ == 9
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then 
                21@ = 108 
                20@ = 109 
                19@ = 110 
                18@ = -65281
                jump @continue1
            end
        end
        if 
            10@ == 14
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then 
                21@ = 114 
                20@ = 115 
                19@ = 116 
                18@ = 16768190
                jump @continue1
            end
        end
        if 
            10@ == 11
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then
               21@ = 121
               20@ = 122
               19@ = 123
               18@ = -1 
               jump @continue1
            end
        end
        if 
           10@ == 10
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then
               21@ = 173     
               20@ = 174     
               19@ = 175     
               18@ = 13158600
               jump @continue1
            end
        end
        if 
            10@ == 13
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then
                21@ = 117 
                20@ = 118 
                19@ = 120 
                18@ = 0
                jump @continue1
            end   
        end
        if 
            10@ == 12
        then
            if and
                051A:   actor 17@ damaged_by_actor $PLAYER_ACTOR 
                Actor.Dead(17@)
            then
                21@ = 124
                20@ = 125 
                19@ = 126 
                18@ = -1
                jump @continue1
            end   
        end
    end
    0AF0: 15@ = get_int_from_ini_file "CLEO\POZIT.INI" section "end_WARS" key "KEY" 
    if or
        15@ == 1
        Actor.Dead($PLAYER_ACTOR)
        $onmission == 1
    then
       :end
        
       0ACa: show_text_highpriority "~r~~H~gang wars disable"
       end_thread
    end
end

:continue1
33@ += 1
wait 0
while true
    wait 0
    if
        33@ >= 3
    then
        goto @startG
    end
    if 
        not 33@ >= 3
    then
       jump @hecking
    end
end

:STARTG
if and
    $onmission == 0
    not Actor.Dead($PLAYER_ACTOR)
then
    else
    0ACa: show_text_highpriority "~r~~H~error"
    goto @end
end
//continue 
30@ = 3 //max wave set 1~8
0ACD: show_text_highpriority "~Y~~H~PROVOCKED GANG WARS GET READY" time 9000 
//ustawienia
//---------------------------------------
16@ = 1 //wave first
// difficulty settings :(
12@ = 24 //first interval
11@ = 100 //first interval
31@ = 30 //first interval
32@ = 30 //first interval
//----------------------------------------
//continue
01F0: set_max_wanted_level_to 0 //disable cops
wait 0 
Model.Load(#GUN_DILDO1)
Model.Load(#GUN_DILDO2)
Model.Load(#GUN_VIBE1)
Model.Load(#GUN_VIBE2)
Model.Load(#FLOWERA)
Model.Load(#GUN_CANE)
Model.Load(#BRASSKNUCKLE)
Model.Load(#GOLFCLUB)
Model.Load(#NITESTICK)
Model.Load(#KNIFECUR)
Model.Load(#BAT)
Model.Load(#SHOVEL)
Model.Load(#POOLCUE)
Model.Load(#KATANA)
Model.Load(#CHNSAW)
Model.Load(#NVGOGGLES)
Model.Load(#IRGOGGLES)
Model.Load(#GUN_PARA)
Model.Load(#CAMERA)
Model.Load(#FIRE_EX)
Model.Load(#AK47)
Model.Load(#M4)
Model.Load(#SNIPER)
Model.Load(#cuntGUN)
Model.Load(#MICRO_UZI)
Model.Load(#SHOTGSPA)
Model.Load(#TEC9)
Model.Load(#MP5LNG)
Model.Load(#SAWNOFF)
Model.Load(#COLT45)
Model.Load(#SILENCED)
Model.Load(#DESERT_EAGLE)
Model.Load(#CHROMEGUN)
Model.Load(#SPRAYCAN)
Model.Load(#HEATSEEK)
Model.Load(#ROCKETLA)
Model.Load(#MINIGUN)
Model.Load(#FLAME)
Model.Load(#GRENADE)
Model.Load(#TEARGAS)
Model.Load(#MOLOTOV)
Model.Load(21@)
Model.Load(20@)
Model.Load(19@)
038B: load_requested_models
 
//succes - action
:next3
wait 250
for 1@ = 0 to 76 step 4
    wait 0 
    0A8E: 2@ = 0@ + 1@ // label offset + item offset
    0A8E: 5@ = 4@ + 1@ // label offset + item offset
    0209: 13@ = random_int_in_ranges 1 4                                                              
    if                                                                                                
      13@ == 1                                                                                        
    then                                                                                              
        0085: 14@ = 21@ // (int)                                                                      
    end                                                                                               
    if                                                                                                
      13@ == 2                                                                                        
    then                                                                                              
        0085: 14@ = 20@ // (int)                                                                      
    end                                                                                               
    if                                                                                                
      13@ == 3                                                                                        
    then                                                                                              
        0085: 14@ = 19@ // (int)                                                                      
    end                                                                                               
    if                                                                                                
      13@ == 4                                                                                        
    then                                                                                              
        0085: 14@ = 19@ // (int)                                                                      
    end                                                                                               
    0208: 23@ = random_float_in_ranges 1.0 70.0                                                       
    0208: 22@ = random_float_in_ranges 100.0 150.0                                                    
    04C4: store_coords_to 26@ 25@ 24@ from_actor $PLAYER_ACTOR with_offset 23@ 22@ 1.0                
    04D3: get_nearest_car_path_coords_from 26@ 25@ 24@ type 2 store_to 27@ 28@ 29@                    
    3@ = Actor.Create(Gang1, 14@, 27@, 28@, 29@)                                                      
    Actor.Angle(3@) = 88.36082                                                                        
    Actor.Health(3@) = 11@
    for 17@ = 0 to 30 step 1                                                                           
        0209: 7@ = random_int_in_ranges 22 12@                                                        
        if and                                                                                         
            not 7@ == 19                                                                                  
            not 7@ == 20                                                                                  
            not 7@ == 21                                                                                  
            not 7@ == 39                                                                                  
            not 7@ == 40                                                                                  
            not 7@ == 44                                                                                  
            not 7@ == 45                                                                                  
        then break                                                                           
        else 0209: 7@ = random_int_in_ranges 22 38
        end                                                                                  
    end                                                                                               
    Actor.GiveWeaponAndAmmo(3@, 7@, 5000)                                                             
    wait 10                                                                                           
    6@ = Marker.CreateAboveActor(3@)                                                                  
    Marker.SetIconSize(6@, 2)                                                                         
    Marker.SetColor(6@, 18@)                                                                          
    07DD: set_actor 3@ attack_rate 31@ // previously known as temper_to                               
    Actor.WeaponAccuracy(3@) = 32@                                                                    
    077A: set_actor 3@ acquaintance 4 to_actors_pedtype 0 // see ped.dat                              
    05E2: AS_actor 3@ kill_actor $PLAYER_ACTOR                                                        
    0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0
    0A8C: write_memory 5@ size 4 value 6@ virtual_protect 0
end

8@ = 0
1@ = 0
9@ = 0

while true
    wait 0
    1@ += 4
    if 1@ > 76
    then 1@ = 0
    end
    0A8E: 2@ = 0@ + 1@ // label offset + item offset
    0A8D: 3@ = read_memory 2@ size 4 virtual_protect 0
    if not actor.Dead(3@)                                             
    then                                          
        else if 056D:   actor 3@ defined          
        then                                      
            Actor.RemoveReferences(3@)            
            wait 50                               
            actor.DestroyInstantly(3@)            
            8@ += 1                               
        end                                       
    end                                           
    if 8@ >= 20 //kill 20 to next
    then
        8@ = 0
        16@ += 1 //next wave
    for 17@ = 0 to 30 step 1                                                                           
        0209: 7@ = random_int_in_ranges 22 12@                                                        
        if and                                                                                         
            not 7@ == 19                                                                                  
            not 7@ == 20                                                                                  
            not 7@ == 21                                                                                  
            not 7@ == 39                                                                                  
            not 7@ == 40                                                                                  
            not 7@ == 44                                                                                  
            not 7@ == 45                                                                                  
        then break                                                                           
        else 0209: 7@ = random_int_in_ranges 22 38
        end                                                                                  
    end                                                       
        11@ += 18 //upgrade hp gang
        31@ += 10 //upgrade attack rate
        32@ += 10 //upgrade gang weapon accuracy
        0ACD: show_text_highpriority "~Y~~H~WAIT TO NEXT WAVE" time 9000
        goto @next3
    end
    0AF0: 15@ = get_int_from_ini_file "CLEO\POZIT.INI" section "end_WARS" key "KEY" 
    if or
        0741:   actor $PLAYER_ACTOR busted 
        wasted_or_busted 
        Player.Wasted(0)
        $onmission == 1
        15@ == 1
    then
        0ACD: show_text_highpriority "~R~~H~SCRIPT UNLOADING" time 9000 
        0AF1: write_int 1 to_ini_file "CLEO\POZIT.INI" section "SET_WARS" key "KEY"
        
        goto @clean3 
    end
    //zone hecker
    Actor.StorePos($PLAYER_ACTOR, 27@, 28@, 29@)
    08F1: get_zone_at 27@ 28@ 29@ nameB_to s$9451 // 8-byte string
    0ADF: add_dynamic_GXT_entry "zox" text s$9451
    0ADF: add_dynamic_GXT_entry "zov" text "wave ~1~ / ~1~"
    0ADF: add_dynamic_GXT_entry "zog" text "war in zone"
    03F0: enable_text_draw 0 
    0340: set_text_draw_RGBA 0 252 252 255 
    033F: set_text_draw_letter_size 0.3 0.8 
    033E: set_draw_text_position 23.0 197.0 GXT 'zog' 
    0340: set_text_draw_RGBA 255 50 50 255 
    033F: set_text_draw_letter_size 0.3 0.8 
    033E: set_draw_text_position 128.0 197.0 GXT "zox" 
    0340: set_text_draw_RGBA 124 252 124 255 
    033F: set_text_draw_letter_size 0.3 0.8 
    045B: draw_text_2numbers 23.0 215.0 GXT 'zov' numbers 16@ 30@
    if    16@ > 30@ // (int) 
    then 
        01E3: show_text_1number_styled GXT 'M_PASS' number 300000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
        Player.Money(0) += 300000
        
        :clean3
        for 1@ = 0 to 76 step 4 
            0A8E: 2@ = 0@ + 1@ // label offset + item offset
            0A8D: 3@ = read_memory 2@ size 4 virtual_protect 0
            if 056D:   actor 3@ defined 
            then 
                Actor.RemoveReferences(3@)
                actor.DestroyInstantly(3@)
            end
        end
        0AE0: remove_text_label "zox"
        0AE0: remove_text_label "zov"
        0AE0: remove_text_label "zog"
        16@ = 0
        01F0: set_max_wanted_level_to 6 
        end_thread_named 'EXC' //unload sk3adniki 
        end_thread
    end
end

:get_1 
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00
end

:get_2
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00
enD